package com.pubg.information.controller;

import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.Map;

@Controller
public class TestController {

    @RequestMapping("/test/btn")
    @ResponseBody
    public Map btn(@RequestBody JSONObject params){
        HashMap map = null;
        map.put("message","9999success");
        return map;
    }

    @RequestMapping(value="/update")
    @ResponseBody
    public ModelAndView update(){
        ModelAndView modelAndView = new ModelAndView("redirect:/redic.html");

        return modelAndView;
    }


    @RequestMapping("/L/I")
    @ResponseBody
    public void li(){
        System.out.println("调用成功");
    }
}